import {connect as ConnectRedux} from 'react-redux'



//吧state挂载到props上
const mapStateToProps = (state:any) => {
  return {
    state:{...state}
  }
}

//吧dispatch挂载到props上
const mapDispatchToProps = (dispatch:any) =>{
  return {
    dispatch:dispatch
  }
}

export const connect = ():any=>{
  return ConnectRedux(mapStateToProps,mapDispatchToProps)
}